package com.qlslylq.ad.sdk.enums;

/**
 * 屏幕方向<br/>
 */
public enum OrientationEnum {

    PORTRAIT("竖屏", "PORTRAIT"),
    LANDSCAPE("横屏", "LANDSCAPE");

    private String id;

    private String name;

    OrientationEnum(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static OrientationEnum getEnumByName(String name) {
        for (OrientationEnum item : OrientationEnum.values()) {
            if (item.getName().equals(name)) {
                return item;
            }
        }
        return null;
    }

}
